<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:fn="http://java.sun.com/jsp/jstl/functions"
      xmlns:c="http://java.sun.com/jsp/jstl/core"> 

<h:head lang="bg"></h:head> 
<body > 
<h:form >
<h:outputLabel value="#{controller.account.person.address.settlements.name}" /><br/>
<ui:param name="userSettlement" value="#{controller.account.person.address.settlements.name}" />
<ui:param name="userMunicipality" value="#{controller.account.person.address.settlements.municipality.name}" />
<ui:param name="d" value="#{controller.account.person.address.settlements.id}" />
<c:if test="#{!controller.account.person.address.settlements.municipality.name.equals(userSettlement)}"><br/>


</c:if>
<c:if test="#{controller.account.person.address.settlements.municipality.name.equals(userSettlement)}">
<h:outputText value="User lives in municipality" /><br />
<h:selectOneMenu value="#{controller.id}">
 	<f:selectItems value="#{controller.candidates}" var="candidat" itemLabel="#{candidat.fName} #{candidat.mName} #{candidat.lName} #{candidat.party.name}" itemValue="#{candidat.id}"></f:selectItems>
</h:selectOneMenu>
<h:commandButton value="Гласувай" action="#{controller.vote()}" type="submit"/>
<!-- <h:selectOneMenu value="#{controller}" >
 	<f:selectItems value="#{controller.candidates}" var="candidate" itemLabel="#{candidate.fName} #{candidate.mName} #{candidate.lName} #{candidate.party.name}" itemValue="#{candidate.id}"></f:selectItems>
</h:selectOneMenu> -->
</c:if><br/>
</h:form>
</body> 
</html>
